import os
# 读取 requirements.txt 文件
# 通过 pip3 install  的方式下载 requirements.txt 中的依赖包 
i=0
with open("re.text", "r" ) as f:
    # 读取每一行
    for line in f:
        # 输出每一行
        i+=1
        print(line,"------------------------------------------------------------------------------------",i"--------------------------------------------")
        l="pip3 install "+ line
        print(l)
        a = os.system(l) # 使用a接收返回值
        print(a)    
        print(line,"------------------------------------------------------------------------------------",i"----------------------------------------")
       